package com.ydh.company.mapper;

import com.ydh.company.pojo.Stock;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface StockMapper {
    /**
     * 根据goodsId查询对应库存里是否有对应的商品
     * @param goodsId
     * @return
     */
    int selectGoods(@Param("goodsId")String goodsId);

    /**
     *
     * @param stock
     * @return
     */
    int addStock(Stock stock);
    /**
     * 根据商品id修改对应商品的库存量
     * @param goodsId
     * @param stockInOut
     * @return
     */
    int PurchaseStockIn(@Param("goodsId")String goodsId,@Param("stockInOut")int stockInOut);

}
